home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / pcl4p51.zip / PCL4P.PAS < prev    next >
Pascal/Delphi Source File  |  1996-06-05  |  5KB  |  202 lines

  1. unit PCL4P;
  2.  
  3. interface
  4.  
  5. const
  6.    (* COMM Ports *)
  7.    COM1 = 0;
  8.    COM2 = 1;
  9.    COM3 = 2;
  10.    COM4 = 3;
  11.    COM5 = 4;
  12.    COM6 = 5;
  13.    COM7 = 6;
  14.    COM8 = 7;
  15.    COM9 = 8;
  16.    COM10 =  9;
  17.    COM11 = 10;
  18.    COM12 = 11;
  19.    COM13 = 12;
  20.    COM14 = 13;
  21.    COM15 = 14;
  22.    COM16 = 15;
  23.    COM17 = 16;
  24.    COM18 = 17;
  25.    COM19 = 18;
  26.    COM20 = 19;
  27.    (* Baud Rate Codes *)
  28.    NORESET  = -1;
  29.    Baud300  = 0;
  30.    Baud600  = 1;
  31.    Baud1200 = 2;
  32.    Baud2400 = 3;
  33.    Baud4800 = 4;
  34.    Baud9600 = 5;
  35.    Baud19200  = 6;
  36.    Baud38400  = 7;
  37.    Baud57600  = 8;
  38.    Baud115200 = 9;
  39.    (* Parity Codes *)
  40.    NoParity  = 0;
  41.    OddParity = 1;
  42.    EvenParity= 3;
  43.    (* Stop Bit Codes *)
  44.    OneStopBit  = 0;
  45.    TwoStopBits = 1;
  46.    (* Word Length Codes *)
  47.    WordLength5 = 0;
  48.    WordLength6 = 1;
  49.    WordLength7 = 2;
  50.    WordLength8 = 3;
  51.    (* Buffer Size Codes *)
  52.    Size128  = 4;
  53.    Size256  = 5;
  54.    Size512  = 6;
  55.    Size1024 = 7;
  56.    Size2048 = 8;
  57.    Size4096 = 9;
  58.    Size8192 =  10;
  59.    Size16384 = 11;
  60.    Size32768 = 12;
  61.    Size1K = 7;
  62.    Size2K = 8;
  63.    Size4K = 9;
  64.    Size8K = 10;
  65.    Size16K = 11;
  66.    Size32K = 12;
  67.    (* Line Status Masks *)
  68.    TransBufferEmpty = $20;
  69.    BreakDetect  = $10;
  70.    FramingError = $08;
  71.    ParityError  = $04;
  72.    OverrunError = $02;
  73.    DataReady    = $01;
  74.    (* Modem Status Masks *)
  75.    DCD = $80;
  76.    RI  = $40;
  77.    DSR = $20;
  78.    CTS = $10;
  79.    DeltaDCD = $08;
  80.    DeltaRI  = $04;
  81.    DeltaDSR = $02;
  82.    DeltaCTS = $01;
  83.    (* Break Signal Commands *)
  84.    ASSERT = 'A';
  85.    CANCEL = 'C';
  86.    DETECT = 'D';
  87.    (* SioDTR & SioRTS Commands *)
  88.    SetPort = 'S';
  89.    ClrPort = 'C';
  90.    ReadPort = 'R';
  91.    (* FIFO level codes *)
  92.    LEVEL_1 =  0;
  93.    LEVEL_4 =  1;
  94.    LEVEL_8 =  2;
  95.    LEVEL_14 = 3;
  96.    (* IRQ codes *)
  97.    IRQ1  =  1;
  98.    IRQ2  =  2;
  99.    IRQ3  =  3;
  100.    IRQ4  =  4;
  101.    IRQ5  =  5;
  102.    IRQ6  =  6;
  103.    IRQ7  =  7;
  104.    IRQ8  =  8;
  105.    IRQ9  =  9;
  106.    IRQ10 = 10;
  107.    IRQ11 = 11;
  108.    IRQ12 = 12;
  109.    IRQ13 = 13;
  110.    IRQ14 = 14;
  111.    IRQ15 = 15;
  112.    (* SioInfo arguments *)
  113.    VERSION = 'V';
  114.    TRANSMITTER = 'I';
  115.    (* timeing constants *)
  116.    ONE_SECOND = 18;
  117.    SHORT_WAIT = 4;
  118.    LONG_WAIT = 10;
  119.    (* CardType constants *)
  120.    PC_PORTS = 0;
  121.    DIGIBOARD = 1;
  122.    BOCABOARD = 2;
  123.  
  124. function SioBaud(Port, BaudCode : Integer) : Integer;
  125. function SioBrkKey : Boolean;
  126. function SioBrkSig(Port : Integer; Cmd : Char) : Integer;
  127. function SioCTS(Port : Integer) : Integer;
  128. function SioDCD(Port : Integer) : Integer;
  129. procedure SioDelay(Tics : Integer);
  130. function SioDone(Port : Integer) : Integer;
  131. function SioDSR(Port : Integer) : Integer;
  132. function SioDTR(Port : Integer; Cmd : Char) : Integer;
  133. function SioError(Code : Integer) : Integer;
  134. function SioFIFO(Port, Code : Integer) : Integer;
  135. function SioFlow(Port, Tics : Integer) : Integer;
  136. function SioGetc(Port, Tics : Integer) : Integer;
  137. function SioGetDiv(Port : Integer) : Integer;
  138. function SioInfo(Cmd : Char) : Integer;
  139. function SioIRQ(Port, IRQcode : Integer) : Integer;
  140. function SioLine(Port : Integer) : Integer;
  141. function SioLoopBack(Port : Integer) : Integer;
  142. function SioModem(Port, Mask : Integer) : Integer;
  143. function SioParms(Port, ParityCode, StopBitsCode, WordLengthCode : Integer) : Integer;
  144. function SioPorts(NumberPorts, FirstPort, StatusReg, CardType : Integer) : Integer;
  145. function SioPutc(Port : Integer; Ch : Char) : Integer;
  146. function SioRead(Port, Register : Integer) : Integer;
  147. function SioReset(Port, BaudCode : Integer) : Integer;
  148. function SioRI(Port : Integer) : Integer;
  149. function SioRTS(Port : Integer; Cmd : Char ) : Integer;
  150. function SioRxBuf(Port, BufferSeg, SizeCode : Integer) : Integer;
  151. function SioRxClear(Port : Integer) : Integer;
  152. function SioRxQue(Port : Integer) : Integer;
  153. function SioTimer : LongInt;
  154. function SioTxBuf(Port, BufferSeg, SizeCode : Integer) : Integer;
  155. function SioTxClear(Port : Integer) : Integer;
  156. function SioTxFlush(Port : Integer) : Integer;
  157. function SioTxQue(Port : Integer) : Integer;
  158. function SioUART(Port, Address : Integer) : Integer;
  159. function SioUnGetc(Port : Integer; Ch : Byte ) : Integer;
  160.  
  161.  
  162. implementation
  163.  
  164. {$L PCL4P}
  165.  
  166. function SioBaud ; external;
  167. function SioBrkKey ; external;
  168. function SioBrkSig ; external;
  169. function SioCTS ; external;
  170. function SioDCD ; external;
  171. procedure SioDelay ; external;
  172. function SioDone ; external;
  173. function SioDSR ; external ;
  174. function SioDTR ; external;
  175. function SioError ; external;
  176. function SioFIFO ; external;
  177. function SioFlow ; external;
  178. function SioGetc ; external;
  179. function SioGetDiv ; external;
  180. function SioInfo ; external;
  181. function SioIRQ ; external;
  182. function SioLine ; external;
  183. function SioLoopBack ; external;
  184. function SioModem ; external;
  185. function SioParms ; external;
  186. function SioPorts ; external;
  187. function SioPutc ; external;
  188. function SioRead ; external;
  189. function SioReset ; external;
  190. function SioRI ; external;
  191. function SioRTS ; external;
  192. function SioRxBuf ; external;
  193. function SioRxClear ; external;
  194. function SioRxQue ; external;
  195. function SioTimer ; external;
  196. function SioTxBuf ; external;
  197. function SioTxClear ; external;
  198. function SioTxFlush ; external;
  199. function SioTxQue ; external;
  200. function SioUART ; external;
  201. function SioUnGetc ; external;
  202. end.